 <template>
   <Card :shadow="shadow">
      <div class="card-name">
        <div class="name width1">基本信息</div>
      </div>
      <div class="content-con margin">
        <div class="bank-form">
          <div class="form-item">
            <!-- <Row>
              <i-col span="12">
                <Row>
                  <i-col span="8" class="ban-left">商户ID</i-col>
                  <i-col span="16">
                    <i-input v-model="this.uid" size="large" readonly></i-input>
                  </i-col>
                </Row>
              </i-col>
            </Row> -->
            <Row :gutter="16">
              <i-col span="12"
              v-for="(basic,index) in basicData"
              :key='basic.id'
              style="padding-top: 15px;">
                <Row v-if="index == 3">
                  <i-col span="8" class="ban-left">
                    {{basic.title}}
                  </i-col>
                  <i-col span="16">
                    <Radio-group v-model="basic.status" style="padding: 8px 0 0 12px;" >
                      <Radio size="large" label="0" disabled>启用</Radio>
                      <Radio size="large" label="1" disabled>停止</Radio>
                    </Radio-group>
                  </i-col>
                </Row>
                <Row v-else>
                  <i-col span="8" class="ban-left">
                    {{basic.title}}
                  </i-col>
                  <i-col span="16">
                    <i-input :value.sync="basic.value" size="large" readonly></i-input>
                  </i-col>
                </Row>
              </i-col>
            </Row>
          </div>
        </div>
      </div>

      <div class="card-name">
        <div class="name width1">账户信息</div>
      </div>
      <div class="content-con">
        <div class="bank-form">
          <div class="form-item">
            <Row :gutter="16">
              <i-col span="12"
              v-for="(account,index) in accountData"
              :key='account.id'
              style="padding-top: 15px;">
                <Row v-if="index == 3">
                  <i-col span="8" class="ban-left1"></i-col>
                  <i-col span="16"></i-col>
                </Row>
                <Row v-else>
                  <i-col span="8" class="ban-left">
                    {{account.title}}
                  </i-col>
                  <i-col span="16">
                    <i-input :value.sync="account.value" size="large" readonly></i-input>
                  </i-col>
                </Row>
              </i-col>
            </Row>
          </div>
        </div>
        <div class="ban-btn">
          <i-button class="save" size="large" @click="btnClick1">返回</i-button>
        </div>
      </div>
   </Card>

 </template>
<script>
import { mapMutations } from 'vuex'
export default {
  name: 'mer-view',
  props: {
    shadow: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {
      // 基本信息
      basicData: [
        {
          title: '商户ID',
          value: this.$route.params.row.uid
        },
        {
          title: '账户名称',
          value: this.$route.params.row.account
        },
        {
          title: '商户名称',
          value: this.$route.params.row.nickname
        },
        {
          title: '商户状态',
          value: this.$route.params.row.status.toString()
        },
        {
          title: '所属代理商',
          value: this.$route.params.row.agent_uid
        },

        {
          title: '真实姓名',
          value: this.$route.params.row.real_name
        },

        {
          title: '创建时间',
          value: this.$route.params.row.add_time
        }
      ],

      accountData: [
        {
          title: '账户余额(元)',
          value: this.$route.params.row.now_money
        },
        {
          title: '代付余额(元)',
          value: this.$route.params.row.paid_money
        },

        {
          title: '保证金(元)',
          value: this.$route.params.row.earnest_money
        },
        {
          title: '冻结金额(元)',
          value: this.$route.params.row.frozen_money
        }
      ]
    }
  },
  // mounted() {
  //   this.userinfo = this.$store.state.user.userInfo;
  //   console.log(this.userinfo)
  // },
  methods: {
    ...mapMutations([
      'closeTag'
    ]),
    close () {
      this.closeTag({
        name: 'mer-view',
        params: {
          row: this.$route.params.row
        }
      })
    },
    // 返回按钮
    btnClick1 () {
      this.close()
    }
  }
}
</script>
 <style lang="less">
   .margin{
     margin-bottom: 20px !important;
   }
   .ban-left1{
     padding: 8px 15px;
     height: 36px;
     line-height: 20px;
    }
 </style>
